<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: zjd
  Date: 2020/8/17
  Time: 10:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>List</title>
    <!-- for-mobile-apps -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name=""/>
    <script type="application/x-javascript"> addEventListener("load", function () {
        setTimeout(hideURLbar, 0);
    }, false);

    function hideURLbar() {
        window.scrollTo(0, 1);
    } </script>
    <!-- //for-mobile-apps -->
    <link href="${pageContext.request.contextPath}/front-style/css/bootstrap.css" rel="stylesheet" type="text/css"
          media="all"/>
    <!-- pop-up -->
    <link href="${pageContext.request.contextPath}/front-style/css/popuo-box.css" rel="stylesheet" type="text/css"
          media="all"/>
    <!-- //pop-up -->
    <link href="${pageContext.request.contextPath}/front-style/css/easy-responsive-tabs.css" rel='stylesheet'
          type='text/css'/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/zoomslider.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/table-style.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/basictable.css"/>
    <!-- list-css -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/front-style/css/list.css" type="text/css"
          media="all"/>
    <!-- //list-css -->
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/style.css"/>
    <link href="${pageContext.request.contextPath}/front-style/css/font-awesome.css" rel="stylesheet">
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/front-style/js/modernizr-2.6.2.min.js"></script>
    <!--/web-fonts-->
    <link href='http://fonts.googleapis.com/css?family=Tangerine:400,700' rel='stylesheet' type='text/css'>
    <link href="http://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
    <!--//web-fonts-->
</head>
<body>
<!--/main-header-->
<!--/banner-section-->
<div id="demo-1" class="banner-inner">
    <div class="banner-inner-dott">
        <!--/header-w3l-->
        <div class="header-w3-agileits" id="home">
            <div class="inner-header-agile part2">
                <nav class="navbar navbar-default">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle" data-toggle="collapse"
                                data-target="#bs-example-navbar-collapse-1">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <h1><a href="${pageContext.request.contextPath}/index.jsp"><span>M</span>ovies <span>P</span>ro</a>
                        </h1>
                    </div>
                    <!-- navbar-header -->
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav">
                            <li><a href="${pageContext.request.contextPath}/index.jsp">Home</a></li>
                            <li class="dropdown active">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Genre <b
                                        class="caret"></b></a>
                                <ul class="dropdown-menu multi-column columns-3">
                                    <li>
                                        <div class="col-sm-4">
                                            <ul class="multi-column-dropdown">
                                                <li><a href="genre.html">Action</a></li>
                                                <li><a href="genre.html">Biography</a></li>
                                                <li><a href="genre.html">Crime</a></li>
                                                <li><a href="genre.html">Family</a></li>
                                                <li><a href="horror.html">Horror</a></li>
                                                <li><a href="genre.html">Romance</a></li>
                                                <li><a href="genre.html">Sports</a></li>
                                                <li><a href="genre.html">War</a></li>
                                            </ul>
                                        </div>
                                        <div class="col-sm-4">
                                            <ul class="multi-column-dropdown">
                                                <li><a href="genre.html">Adventure</a></li>
                                                <li><a href="comedy.html">Comedy</a></li>
                                                <li><a href="genre.html">Documentary</a></li>
                                                <li><a href="genre.html">Fantasy</a></li>
                                                <li><a href="genre.html">Thriller</a></li>
                                            </ul>
                                        </div>
                                        <div class="col-sm-4">
                                            <ul class="multi-column-dropdown">
                                                <li><a href="genre.html">Animation</a></li>
                                                <li><a href="genre.html">Costume</a></li>
                                                <li><a href="genre.html">Drama</a></li>
                                                <li><a href="genre.html">History</a></li>
                                                <li><a href="genre.html">Musical</a></li>
                                                <li><a href="genre.html">Psychological</a></li>
                                            </ul>
                                        </div>
                                        <div class="clearfix"></div>
                                    </li>
                                </ul>
                            </li>
                            <li><a href="series.html">tv - series</a></li>
                            <li><a href="news.html">news</a></li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Country <b class="caret"></b></a>
                                <ul class="dropdown-menu multi-column columns-3">
                                    <li>
                                        <div class="col-sm-4">
                                            <ul class="multi-column-dropdown">
                                                <li><a href="genre.html">Asia</a></li>
                                                <li><a href="genre.html">France</a></li>
                                                <li><a href="genre.html">Taiwan</a></li>
                                                <li><a href="genre.html">United States</a></li>
                                            </ul>
                                        </div>
                                        <div class="col-sm-4">
                                            <ul class="multi-column-dropdown">
                                                <li><a href="genre.html">China</a></li>
                                                <li><a href="genre.html">HongCong</a></li>
                                                <li><a href="genre.html">Japan</a></li>
                                                <li><a href="genre.html">Thailand</a></li>
                                            </ul>
                                        </div>
                                        <div class="col-sm-4">
                                            <ul class="multi-column-dropdown">
                                                <li><a href="genre.html">Euro</a></li>
                                                <li><a href="genre.html">India</a></li>
                                                <li><a href="genre.html">Korea</a></li>
                                                <li><a href="genre.html">United Kingdom</a></li>
                                            </ul>
                                        </div>
                                        <div class="clearfix"></div>
                                    </li>
                                </ul>
                            </li>
                            <li><a href="list.html">A - z list</a></li>
                            <li><a href="contact.html">Contact</a></li>
                        </ul>

                    </div>
                    <div class="clearfix"></div>
                </nav>
                <div class="w3ls_search">
                    <div class="cd-main-header">
                        <ul class="cd-header-buttons">
                            <li><a class="cd-search-trigger" href="#cd-search"> <span></span></a></li>
                        </ul> <!-- cd-header-buttons -->
                    </div>
                    <div id="cd-search" class="cd-search">
                        <form action="#" method="post">
                            <input name="Search" type="search" placeholder="Search...">
                        </form>
                    </div>
                </div>

            </div>

        </div>
        <!--//header-w3l-->
    </div>
</div>
<!--/banner-section-->
<!--//main-header-->
<!--/banner-bottom-->
<div class="w3_agilits_banner_bootm">
    <div class="w3_agilits_inner_bottom">
        <div class="col-md-6 wthree_agile_login">
            <c:if test="${sessionScope.userinfo!=null}">
                <ul>
                    <li><img style="height: 40px;width: 40px;margin-top: -10px"
                             src="${pageContext.request.contextPath}/DownloadFileServlet?fileName=${sessionScope.userinfo.user_img}"
                             alt="头像"></li>
                    <li><p>${sessionScope.userinfo.user_acount}</p></li>
                    <li><a href="#" data-toggle="modal" data-target="#myModall6">个人中心</a></li>
                    <li><a href="${pageContext.request.contextPath}/userinfo/exit">退出</a></li>
                </ul>
            </c:if>
            <c:if test="${sessionScope.userinfo==null}">
                <ul>
                    <li><i class="fa fa-phone" aria-hidden="true"></i> (+000) 009 455 4088</li>
                    <li><a href="#" class="login" data-toggle="modal" data-target="#myModal4">Login</a></li>
                    <li><a href="#" class="login reg" data-toggle="modal" data-target="#myModal5">Register</a></li>

                </ul>
            </c:if>
        </div>
        <div class="col-md-6 wthree_share_agile">


        </div>
    </div>
</div>
<!--//banner-bottom-->
<!-- Modal1 -->
<div class="modal fade" id="myModal4" tabindex="-1" role="dialog">

    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4>登录</h4>
                <div class="login-form">
                    <form action="${pageContext.request.contextPath}/userinfo/login" method="post">
                        <input type="text" name="user_acount" id="user_acount" placeholder="账号" required="">
                        <input type="password" name="user_password" id="user_password" placeholder="密码" required="">
                        <div class="tp">
                            <input type="submit" value="LOGIN NOW">
                        </div>
                        <div class="forgot-grid">
                            <div class="log-check">
                                <label class="checkbox"><input type="checkbox" name="checkbox">Remember me</label>
                            </div>
                            <div class="forgot">
                                <a href="#" data-toggle="modal" data-target="#myModal2">Forgot Password?</a>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- //Modal1 -->
<!-- Modal1 -->
<div class="modal fade" id="myModal5" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4>注册</h4>
                <div class="login-form">
                    <form action="${pageContext.request.contextPath}/userinfo/register" method="post"
                          enctype="multipart/form-data">
                        <input type="text" name="user_acount" placeholder="账号" required="">
                        <input type="password" name="user_password" placeholder="密码" required="">
                        <input type="password" name="conform password" placeholder="Confirm Password" required="">
                        <input type="tel" name="user_tel" placeholder="电话" required="">
                        <input type="file" name="user_img" placeholder="头像" required="">
                        <div class="signin-rit">
													<span class="agree-checkbox">
														<label class="checkbox"><input type="checkbox" name="checkbox">I agree to your <a
                                                                class="w3layouts-t" href="#" target="_blank">Terms of Use</a> and <a
                                                                class="w3layouts-t" href="#" target="_blank">Privacy Policy</a></label>
													</span>
                        </div>
                        <div class="tp">
                            <input type="submit" value="REGISTER NOW">
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- //Modal1 -->
<!-- breadcrumb -->
<div class="w3_breadcrumb">
    <div class="breadcrumb-inner">
        <ul>
            <li><a href="${pageContext.request.contextPath}/index.jsp">主页</a><i>//</i></li>
            <li>我的订单</li>
        </ul>
    </div>
</div>
<!-- //breadcrumb -->
<!--/content-inner-section-->
<div class="w3_content_agilleinfo_inner">
    <div class="agile_featured_movies">
        <div class="inner-agile-w3l-part-head">
            <h3 class="w3l-inner-h-title">订单列表</h3>
            <p class="w3ls_head_para">全部订单查询</p>
        </div>
        <div class="bs-example bs-example-tabs" role="tabpanel" data-example-id="togglable-tabs">

            <div id="myTabContent" class="tab-content">
                <div role="tabpanel" class="tab-pane fade in active">
                    <div class="agile-news-table" >
                        <div class="w3ls-news-result">
                            <h4>Search Results : <span id="total">0</span></h4>
                        </div>
                        <div>
                            <table id="table-breakpoint">
                                <thead>
                                <tr>
                                    <th class="hidden">订单编号</th>
                                    <th>电影名</th>
                                    <th>上映时间</th>
                                    <th>电影类型</th>
                                    <th>座位号</th>
                                    <th>展厅名称</th>
                                    <th>展厅类型</th>
                                    <th>评分</th>
                                </tr>
                                </thead>
                                <tbody>
                                <%--<tr>
                                    <td>1</td>
                                    <td class="w3-list-img"><a href="single.html"><img src="" alt=""/>
                                        <span>Swiss Army Man</span></a>
                                    </td>
                                    <td>2016</td>
                                    <td>HD</td>
                                    <td class="w3-list-info"><a href="genre.html">United Kingdom</a></td>
                                    <td class="w3-list-info"><a href="comedy.html"> Drama</a></td>
                                    <td>7.0</td>
                                </tr>--%>
                                </tbody>
                            </table>
                        </div>
                        <div class="container-fluid text-center">
                            <ul class="pager" id="footlist">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
</div>
<!--//content-inner-section-->


<!--/footer-bottom-->
<div class="contact-w3ls" id="contact">
    <div class="footer-w3lagile-inner">
        <h2><span>下次一定影院在线系统</span></h2>
        <p class="para">不要下次一定,这就是一定.</p>
        <div class="footer-grids w3-agileits">
            <div class="col-md-2 footer-grid">
                <h4>广告位</h4>
                <ul>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                </ul>
            </div>
            <div class="col-md-2 footer-grid">
                <h4>广告位</h4>
                <ul>

                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li><li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>



                </ul>
            </div>


            <div class="col-md-2 footer-grid">
                <h4>合作单位</h4>
                <ul class="w3-tag2">
                    <li><a href="javascript:void(0)">合作单位1</a></li>
                    <li><a href="javascript:void(0)">合作单位2</a></li>
                    <li><a href="javascript:void(0)">合作单位3</a></li>
                    <li><a href="javascript:void(0)">合作单位4</a></li>
                    <li><a href="javascript:void(0)">合作单位5</a></li>
                    <li><a href="javascript:void(0)">合作单位6</a></li>
                    <li><a href="javascript:void(0)">合作单位7</a></li>
                </ul>


            </div>
            <div class="col-md-2 footer-grid">
                <h4>合作院线</h4>
                <div class="footer-grid1">
                    <div class="footer-grid1-left">
                        <a href="javascript:void(0)"><img src="${pageContext.request.contextPath}/front-style/images/1.jpg" alt=" " class="img-responsive"></a>
                    </div>
                    <div class="footer-grid1-right">
                        <a href="javascript:void(0)">左侧放logo,右侧是名字</a>

                    </div>
                    <div class="clearfix"> </div>
                </div>
            </div>
            <div class="col-md-2 footer-grid">
                <h4 class="b-log"><a href="${pageContext.request.contextPath}/index.jsp"><span>我</span>的 <span>院</span>线</a></h4>

                <div class="clearfix"> </div>
            </div>
            <div class="clearfix"> </div>
            <ul class="bottom-links-agile">
                <li><a href="javascript:void(0)" title="Font Icons" class="aiguo">民主</a></li>
                <li><a href="javascript:void(0)" title="Short Codes" class="aiguo">富强</a></li>
                <li><a href="javascript:void(0)" title="contact" class="aiguo">爱国</a></li>

            </ul>
        </div>


    </div>

</div>
<div class="w3agile_footer_copy">
    <p>制作团队 &copy; 四期三阶段.严宇 赵井东 陆亮.<a target="_blank" href="http://www.baidu.com/">有问题问百度</a></p>
</div>
<a href="#home" id="toTop" class="scroll" style="display: block;"> <span id="toTopHover"
                                                                         style="opacity: 1;"> </span></a>

<script src="${pageContext.request.contextPath}/front-style/js/jquery-1.11.1.min.js"></script>
<!-- Dropdown-Menu-JavaScript -->
<!-- //Dropdown-Menu-JavaScript -->
<!-- search-jQuery -->
<script src="${pageContext.request.contextPath}/front-style/js/main.js"></script>

<script src="${pageContext.request.contextPath}/front-style/js/simplePlayer.js"></script>
<script>
    $("document").ready(function () {
        $("#video").simplePlayer();
    });
</script>
<script>
    $("document").ready(function () {
        $("#video1").simplePlayer();
    });
</script>
<script>
    $("document").ready(function () {
        $("#video2").simplePlayer();
    });
</script>
<script>
    $("document").ready(function () {
        $("#video3").simplePlayer();
    });
</script>
<script>
    $("document").ready(function () {
        $("#video4").simplePlayer();
    });
</script>
<script>
    $("document").ready(function () {
        $("#video5").simplePlayer();
    });
</script>
<script>
    $("document").ready(function () {
        $("#video6").simplePlayer();
    });
</script>

<!-- pop-up-box -->
<script src="${pageContext.request.contextPath}/front-style/js/jquery.magnific-popup.js"
        type="text/javascript"></script>
<!--//pop-up-box -->

<div id="small-dialog1" class="mfp-hide">
    <iframe src=""></iframe>
</div>
<div id="small-dialog2" class="mfp-hide">
    <iframe src=""></iframe>
</div>
<script>
    $(document).ready(function () {
        $('.w3_play_icon,.w3_play_icon1,.w3_play_icon2').magnificPopup({
            type: 'inline',
            fixedContentPos: false,
            fixedBgPos: true,
            overflowY: 'auto',
            closeBtnInside: true,
            preloader: false,
            midClick: true,
            removalDelay: 300,
            mainClass: 'my-mfp-zoom-in'
        });

    });
</script>
<script src="${pageContext.request.contextPath}/front-style/js/easy-responsive-tabs.js"></script>
<script>
    $(document).ready(function () {
        $('#horizontalTab').easyResponsiveTabs({
            type: 'default', //Types: default, vertical, accordion
            width: 'auto', //auto or any width like 600px
            fit: true,   // 100% fit in a container
            closed: 'accordion', // Start closed if in accordion view
            activate: function (event) { // Callback function if tab is switched
                var $tab = $(this);
                var $info = $('#tabInfo');
                var $name = $('span', $info);
                $name.text($tab.text());
                $info.show();
            }
        });
        $('#verticalTab').easyResponsiveTabs({
            type: 'vertical',
            width: 'auto',
            fit: true
        });
    });
</script>
<!-- tables -->
<script type="text/javascript"
        src="${pageContext.request.contextPath}/front-style/js/jquery.basictable.min.js"></script>

<!-- //tables -->


<!--/script-->
<script type="text/javascript" src="${pageContext.request.contextPath}/front-style/js/move-top.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/front-style/js/easing.js"></script>

<script type="text/javascript">
    $(document).ready(function () {
        /*
							var defaults = {
					  			containerID: 'toTop', // fading element id
								containerHoverID: 'toTopHover', // fading element hover id
								scrollSpeed: 1200,
								easingType: 'linear'
					 		};
							*/

        $().UItoTop({easingType: 'easeOutQuart'});

    });
</script>
<!--end-smooth-scrolling-->
<script src="${pageContext.request.contextPath}/front-style/js/bootstrap.js"></script>

<script>
    $("#table-breakpoint").on("dblclick", "tr", function () {
        var td = $(this).find("td");
        var order_no = td.eq(0).text();
        if (order_no != "") {
            location.href = "${pageContext.request.contextPath}/orders/toOrderDetail?order_no=" + order_no;
        }
    })

    function del(order_no,i) {
        var b = confirm("确认删除吗？");
        if (b) {
            $.post("${pageContext.request.contextPath}/orders/delOrder",
                {order_no: order_no},
                function (data) {
                    if (data) {
                        topage(i)
                    } else {
                        alert("删除失败")
                    }
                })
        }
    }

    function lod() {
        $.post("${pageContext.request.contextPath}/orders/queryByUser",
            {user_no: '${sessionScope.userinfo.user_no}'},
            function (data) {
                loddata(data);
            }, "json"
        )
    }

    function loddata(data) {
        /* var context = "";*/
        var context = "<thead>\n" +
            "                            <tr>\n" +
            "                                <th class='hidden'>订单编号</th>\n" +
            "                                <th>电影名</th>\n" +
            "                                <th>上映时间</th>\n" +
            "                                <th>电影类型</th>\n" +
            "                                <th>座位号</th>\n" +
            "                                <th>展厅名称</th>\n" +
            "                                <th>展厅类型</th>\n" +
            "                                <th>我的评分</th>\n" +
            "                                <th>操作</th>\n"
        "                            </tr>\n" +
        "                            </thead><tbody id='table-tbody'>"
        $.each(data.list, function (index, obj) {
            /* + obj.showings.movies.movie_img + */
            context += "<tr>" +
                "                                <td class='hidden'>" + obj.order_no + "</td>\n" +
                "                                <td class=\"w3-list-img\"><a href=\"single.html\"><img src=\"${pageContext.request.contextPath}/DownloadFile?movieImg=" + obj.showings.movies.movieImg + "\" alt=\"电影图片\"  style=\" \"/> <span>" + obj.showings.movies.movieName + "</span></a></td>\n" +
                "                                <td>" + obj.showings.movies.movieDate + "</td>\n" +
                "                                <td>" + obj.showings.movies.categorys.category_name + "</td>\n" +
                "                                <td><span>" + obj.order_seatno + "</span></td>\n" +
                "                                <td class=\"w3-list-info\"><span>" + obj.showings.cinemas.cinema_name + "</span></td>\n" +
                "                                <td class=\"w3-list-info\"><span>" + obj.showings.cinemas.ctypes.type_name + "</span></td>\n";
            if (obj.comments == null) {
                context += "<td class=\"w3-list-info\">未评价</td>\n";
            } else {
                context += "                                <td class=\"w3-list-info\">" + obj.comments.movie_score + "</td>\n";
            }
            context += "                                <td><a class='button' href='javascript:del(" + obj.order_no +","+data.pageNum+ ")'>删除</a></td>" +
                "                            </tr>"
        })
        context += "</tbody>"
        $("#total").html(data.total)
        $("#table-breakpoint").empty();
        $("#table-breakpoint").append(context);

        $("#footlist").empty()
        if (data.isFirstPage) {
            $("#footlist")
                .append(
                    "<li class=\"page-item disabled\"><a class=\"page-link\" href=\"#\">首页</a></li>")
        } else {
            $("#footlist")
                .append(
                    "<li class=\"page-item\"><a class=\"page-link\" onclick=\"frpage()\">首页</a></li>")
        }

        if (data.isFirstPage) {
            $("#footlist")
                .append(
                    "<li class=\"page-item disabled\"><a class=\"page-link\" href=\"#\">上一页</a></li>")
        } else {
            $("#footlist").append(
                "<li class=\"page-item\"><a class=\"page-link\" onclick=\"topage("
                + (data.pageNum - 1) + ")\">上一页</a></li>")
        }
        for (i = 1; i <= data.pages; i++) {
            if (i == data.pageNum) {
                $("#footlist").append(
                    "<li class=\"page-item active disabled\"><a class=\"page-link\">"
                    + i + "</a></li>")
            } else {
                $("#footlist").append(
                    "<li class=\"page-item\"><a class=\"page-link\" onclick=\"topage("
                    + i + ")\">" + i + "</a></li>")
            }
        }
        if (data.pageNum == data.pages) {
            $("#footlist")
                .append(
                    "<li class=\"page-item disabled\"><a class=\"page-link\" href=\"#\">下一页</a></li>")
        } else {
            $("#footlist").append(
                "<li class=\"page-item\"><a class=\"page-link\" onclick=\"topage("
                + (data.pageNum + 1) + ")\">下一页</a></li>")
        }
        if (data.pageNum == data.pages) {
            $("#footlist")
                .append(
                    "<li class=\"page-item disabled\"><a class=\"page-link\">末页</a></li>")
        } else {
            $("#footlist").append(
                "<li class=\"page-item\"><a class=\"page-link\" onclick=\"enpage("
                + data.totalPage + ")\">末页</a></li>")
        }
        /*$("#footlist")
            .append(
                "<li class=\"page-item\"><input id=\"tonum\" style=\"width:50px;\" type=\"number\" min=\"1\" value=" + data.pageNum + " max=" + data.pages + " class=\"page-link\"/>")
        $("#footlist")
            .append(
                "<input style=\"width:80px;\" class=\"btn btn-danger\" type=\"buutton\" value=\"跳转\" onclick=\"tonumpage("
                + data.pages
                + ","
                + data.pageNum
                + ")\"/>")*/
    }

    function topage(i) {
        $.post("${pageContext.request.contextPath }/orders/queryByUser",
            {
                user_no: '${sessionScope.userinfo.user_no}',
                pageNum: i
            }, function (result) {
               loddata(result)
            }, "json")
    }

    //首页
    function frpage() {
        topage(1)
    }

    //尾页
    function enpage(enpage) {
        topage(enpage)
    }

    //跳转
    function tonumpage(totl, page) {
        num = $("#tonum").val();
        if (num > 0 && num <= totl) {
            topage(num)
        } else {
            $("#tonum").val(page);
        }
    }
</script>
</body>
<script>
    $(function () {
        lod();
        $(".scroll").click(function (event) {
            event.preventDefault();
            $('html,body').animate({scrollTop: $(this.hash).offset().top}, 900);
        });
        $(".dropdown").hover(
            function () {
                $('.dropdown-menu', this).stop(true, true).slideDown("fast");
                $(this).toggleClass('open');
            },
            function () {
                $('.dropdown-menu', this).stop(true, true).slideUp("fast");
                $(this).toggleClass('open');
            }
        );

        $(".aiguo").click(function(){
            alert("你真棒!!!发现彩蛋,去吧台给你优惠")
        });
    })
</script>
</html>
